package interaction.input.concrete;

import processing.core.PFont;
import processing.core.PGraphics;
import processing.core.PVector;
import interaction.input.DataComponent;

public class IntroComponent extends DataComponent<Boolean> {
	private PFont font;
	
	public IntroComponent(PVector position, PVector size, PFont font) {
		super(position, size);
		this.font = font;
	}

	protected void drawRelative(PGraphics g) {
		g.textFont(font);
		g.textAlign(PGraphics.CENTER, PGraphics.CENTER);
		g.text("Make sure you've got a microphone,\nthen click somewhere", g.width / 2, g.height / 2);
	}

	public void mousePressed(PVector p) {
		getDataSource().set(true);
	}
}
